Skip to main content
Version: 1.0.5

Content Lake API

Content Lake API Documentation

Version: 1.0.5

Paths

/cl/api/v1/health/

  • Method: GET
  • Summary: Health
  • Description: Return Health Status. :return:
  • Operation ID: health_cl_api_v1_health__get
  • Responses:
    • 200:
      • Description: Successful Response
      • Content-Type: application/json

/cl/api/v1/objects/

Get All Objects From The Repository API

/cl/api/v1/objects/

  • Method: GET
  • Summary: Get All Objects From The Repository
  • Description: Return a list of all the objects that are present in the object repository.
  • Operation ID: Get_all_objects_from_the_repository_cl_api_v1_objects__get

Request Payload:

TypeParameterDescriptionData Typeis_optional
Query Parameterfolder_idIdentifier of a folder within a hierarchical structure.stringmandatory
Query Parameterpage_noSpecifies the page number to retrieve (1-based index).intmandatory
Query Parameterpage_sizeSpecifies the number of items per page.intmandatory
Parametersorting_bySort result by title or modified_datestringOptional
ParameterorderSort result in ascending or descending orderstringmandatory (Default - Asc)
Parameterobject_typeList of object types, Object types - Document, Audio, Video, Image, Course, Rubric, Assessment, Assignment, Question, ExternalTool, Glossary, DiscussionForum, Page, QuizstringOptional

Note -

order -

Users should be able to specify whether the sorting should be in ascending or descending order. Ascending order sorts the objects from the lowest value to the highest, while descending order sorts from the highest value to the lowest.

object_type-

The API endpoint for retrieving all objects is accept filtering parameters based on object type. Users is be able to specify one or more object types to filter the returned objects.

sorting_by

The API endpoint for retrieving all objects is accept sorting parameters. Sorting parameters should include fields such as Title and Modified date.

sample code

import requests
URL = "https://api.kadal.ai/cl/api/v1/objects/"

# sample python code
headers = { "Authorization ": "Bearer 1234567890" }

params={
"folder_id":"string",
"sorting_by":"string",
"order":"asc/desc",
"object_type":"array",
"page_size":int,
"ext_user_id_ref":"string"

}

response = requests.get(URL, headers=headers,params=params)
print(response)

Example response -

{
"message": "string",
"data": {
"total": 0,
"records": [
{
"object_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"version_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"version_no": 1,
"version_label": "string",
"tenant_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"object_type": "string",
"title": "string",
"description": "string",
"file_name": "string",
"file_extension": "string",
"size": 0,
"mimetype": "string",
"uri": "string",
"asset_location": "string",
"default_asset_thumbnail": "string",
"created_at": "2024-05-09T10:53:50.953Z",
"updated_at": "2024-05-09T10:53:50.953Z",
"deleted_at": "2024-05-09T10:53:50.953Z",
"created_by_name": "string",
"created_by_user_id": "string",
"created_by_user_type": "string",
"updated_by_name": "string",
"deleted_by_name": "string",
"is_latest_version": false,
"is_deleted": false,
"is_private": false,
"is_lga": "string",
"source": "string",
"tags": [
"string"
],
"kvp": {},
"taxonomy": [
{
"uuid": "string",
"title": "string"
}
],
"folders": [
"string"
],
"repos": [
"string"
],
"media": {
"height": 0,
"width": 0,
"audio_video_duration": 0,
"audio_description_text": "string",
"alt_text": "string",
"thumbnail": "string",
"streamingDetails": {
"resolution": "string",
"url": "string",
"label": "string"
},
"transcriptionDetails": {
"language": "string",
"url": "string",
"label": "string"
}
},
"usage_count": 0,
"license_expiration_date": "2024-05-09T10:53:50.954Z",
"license_validity": true,
"chunk_metadata": {},
"score": 0,
"content": ""
}
],
"aggregations": {}
}
}

Responses:

Status CodeDescriptionContent-Type
200Successful Responseapplication/json
404Object not foundapplication/json
400Bad Requestapplication/json
500Internal server errorapplication/json
422Validation Errorapplication/json
  • 200 (Successful Response): This response indicates a successful retrieval of all objects in the repository.
  • 404 (Object not found): This response indicates that the requested objects are not found in the repository.
  • 400 (Bad Request): This response indicates that the request is invalid or malformed.
  • 500 (Internal server error): This response indicates an unexpected server error occurred while processing the request.
  • 422 (Validation Error): This response indicates that there are validation errors with the request parameters.

Get All Objects From The Repository API (POST API V2)

/cl/api/v2/objects/

  • Method: POST
  • Summary: Get All Objects From The Repository
  • Description: Return a list of all the objects that are present in the object repository.
  • Operation ID: Get_all_objects_from_the_repository_cl_api_v1_objects__get

Request Payload:

TypeParameterDescriptionData Typeis_optional
Query Parameterfolder_idIdentifier of a folder within a hierarchical structure.stringoptional
Query Parameterpage_noSpecifies the page number to retrieve (1-based index).intoptional
Query Parameterpage_sizeSpecifies the number of items per page.intoptional
Parametersorting_bySort result by title or modified_datestringOptional
ParameterorderSort result in ascending or descending orderstringoptional (Default - Asc)
Parameterobject_typeList of object types, Object types - Document, Audio, Video, Image, Course, Rubric, Assessment, Assignment, Question, ExternalTool, Glossary, DiscussionForum, Page, QuizstringOptional
Query Parameterobject_idsList of object IDsList of UUIdoptional
Query Parameterfolder_idsList of folder IDsList of UUIdoptional
Query Parameterobject_typesList of object typesstringoptional
Query Parameterfile_extensionFile extensionstringoptional
Query Parametercreated_byCreator of the objectstringoptional
Query Parameterupdated_byLast updater of the objectstringoptional
Query ParametersourceSource of the objectstringoptional
Query ParameterreposRepository associated with the objectstringoptional
Query Parameteris_privateIndicates if the object is privatebooleanoptional
Query Parameterext_user_id_refExternal user ID referencestringoptional

Note -

order -

Users should be able to specify whether the sorting should be in ascending or descending order. Ascending order sorts the objects from the lowest value to the highest, while descending order sorts from the highest value to the lowest.

object_type-

The API endpoint for retrieving all objects is accept filtering parameters based on object type. Users is be able to specify one or more object types to filter the returned objects.

sorting_by

The API endpoint for retrieving all objects is accept sorting parameters. Sorting parameters should include fields such as Title and Modified date.

sample code

import requests
URL = "https://api.kadal.ai/cl/api/v2/objects/"

# sample python code
headers = { "Authorization ": "Bearer 1234567890" }

params:{
"code": "string",
"version_label": "string",
"object_type": "Document",
"title": "string",
"description": "string",
"file_name": "string",
"file_extension": "string",
"uri": "string",
"tags": [
"string"
],
"kvp": {},
"taxonomy": [
{
"uuid": "string",
"title": "string"
}
],
"repos": [
"string"
],
"folders": [
"string"
],
"source": "string",
"is_private": False,
"is_lga": "G",
"is_deleted": False,
"license_expiration_date": "2024-08-21T17:50:41.351Z",
"license_validity": True,
"created_by_name": "string",
"metadata": {},
"media": {}
}

response = requests.post(URL, headers=headers,params=params)
print(response)

Example response -

{
"message": "string",
"data": {
"total": 0,
"records": [
{
"object_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"version_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"version_no": 1,
"version_label": "string",
"tenant_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"object_type": "string",
"title": "string",
"description": "string",
"file_name": "string",
"file_extension": "string",
"size": 0,
"mimetype": "string",
"uri": "string",
"asset_location": "string",
"default_asset_thumbnail": "string",
"created_at": "2024-06-28T09:20:23.236Z",
"updated_at": "2024-06-28T09:20:23.236Z",
"deleted_at": "2024-06-28T09:20:23.236Z",
"created_by_name": "string",
"created_by_user_id": "string",
"created_by_user_type": "string",
"updated_by_name": "string",
"deleted_by_name": "string",
"is_latest_version": false,
"is_deleted": false,
"is_private": false,
"is_lga": "string",
"source": "string",
"tags": [
"string"
],
"kvp": {},
"taxonomy": [
{
"uuid": "string",
"title": "string"
}
],
"folders": [
"string"
],
"repos": [
"string"
],
"media": {},
"usage_count": 0,
"license_expiration_date": "2024-06-28T09:20:23.236Z",
"license_validity": true,
"score": 0,
"content": ""
}
],
"aggregations": {}
}
}

Responses:

Status CodeDescriptionContent-Type
200Successful Responseapplication/json
404Object not foundapplication/json
400Bad Requestapplication/json
500Internal server errorapplication/json
422Validation Errorapplication/json
  • 200 (Successful Response): This response indicates a successful retrieval of all objects in the repository.
  • 404 (Object not found): This response indicates that the requested objects are not found in the repository.
  • 400 (Bad Request): This response indicates that the request is invalid or malformed.
  • 500 (Internal server error): This response indicates an unexpected server error occurred while processing the request.
  • 422 (Validation Error): This response indicates that there are validation errors with the request parameters.

Create A New Object In The Repository API

/cl/api/v1/objects/

  • Method: POST
  • Summary: Create A New Object In The Repository
  • Description: Create a new object in the object repository.
  • Operation ID: Create_a_new_object_in_the_repository_cl_api_v1_objects__post

Request Payload:

TypeParameterDescriptionData Typeis_optional
Query ParametercodeID or code for the documentstringoptional
Query Parameterversion_labelLabel or identifier for the version of the documentstringoptional
Query Parameterobject_typeType of the object (e.g., "Document")stringmandatory
Query ParametertitleTitle or name of the documentstringoptional
Query ParameterdescriptionDescription or summary of the documentstringoptional
Query Parameterfile_nameName of the file associated with the documentstringoptional
Query Parameterfile_extensionFile extension of the associated filestringoptional
Query ParameteruriUniform Resource Identifier (URI) for accessing the documentstringmandatory
Query ParametertagsList of tags associated with the documentarray of stringsoptional
Query ParameterkvpKey-value pairs for additional metadataobjectoptional
Query ParametertaxonomyTaxonomy information related to the documentarray of objectsoptional
Query ParameterreposList of repositories where the document is storedarray of stringsoptional
Query ParameterfoldersList of folders where the document is organizedarray of stringsoptional
Query ParametersourceSource or origin of the documentstringmandatory
Query Parameteris_privateFlag indicating if the document is private (true) or public (false)booleanoptional
Query Parameteris_lgaFlag indicating if the document is subject to Local Government Access (LGA)string (e.g., "G" for Yes)optional
Query Parameteris_latest_versionFlag indicating if this is the latest version of the documentbooleanoptional
Query Parameteris_deletedFlag indicating if the document has been deleted (true) or not (false)booleanoptional
Query Parameterlicense_expiration_dateExpiration date of the document's licensestring (ISO 8601 format)optional
Query Parameterlicense_validityFlag indicating the validity of the document's license (true/false)booleanoptional
Query Parametercreated_by_nameName of the user who created the documentstringoptional
Query ParametermetadataAdditional metadata associated with the documentoptional
Query Parameterfolder_idIdentifier of a folder within a hierarchical structurestringoptional
Query Parameterpage_noSpecifies the page number to retrieve (1-based index)intoptional
Query Parameterpage_sizeSpecifies the number of items per pageintoptional

Example response -

{
"status": "string",
"message": "string",
"data": {
"object_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"version_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"version_no": 1,
"version_label": "string",
"tenant_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"object_type": "string",
"title": "string",
"description": "string",
"file_name": "string",
"file_extension": "string",
"size": 0,
"mimetype": "string",
"uri": "string",
"asset_location": "string",
"default_asset_thumbnail": "string",
"created_at": "2024-05-09T10:57:58.376Z",
"updated_at": "2024-05-09T10:57:58.376Z",
"deleted_at": "2024-05-09T10:57:58.376Z",
"created_by_name": "string",
"created_by_user_id": "string",
"created_by_user_type": "string",
"updated_by_name": "string",
"deleted_by_name": "string",
"is_latest_version": false,
"is_deleted": false,
"is_private": false,
"is_lga": "string",
"source": "string",
"tags": [
"string"
],
"kvp": {},
"taxonomy": [
{
"uuid": "string",
"title": "string"
}
],
"folders": [
"string"
],
"repos": [
"string"
],
"media": {
"height": 0,
"width": 0,
"audio_video_duration": 0,
"audio_description_text": "string",
"alt_text": "string",
"thumbnail": "string",
"streamingDetails": {
"resolution": "string",
"url": "string",
"label": "string"
},
"transcriptionDetails": {
"language": "string",
"url": "string",
"label": "string"
}
},
"usage_count": 0,
"license_expiration_date": "2024-05-09T10:57:58.376Z",
"license_validity": true,
"chunk_metadata": {}
}
}

Responses:

Status CodeDescriptionContent-Type
200Successful Responseapplication/json
404Object not foundapplication/json
400Bad Requestapplication/json
500Internal server errorapplication/json
422Validation Errorapplication/json
  • 200 (Successful Response): This response indicates successful creation of a new object in the repository.
  • 404 (Object not found): This response indicates that the requested objects are not found in the repository.
  • 400 (Bad Request): This response indicates that the request is invalid or malformed.
  • 500 (Internal server error): This response indicates an unexpected server error occurred while processing the request.
  • 422 (Validation Error): This response indicates that there are validation errors with the request parameters.

Get Object Details For An Object ID API

/cl/api/v1/objects/{object_id}

  • Method: GET
  • Summary: Get Object Details For An Object Id
  • Description: Return object details from the object repository for the specified object ID.
  • Operation ID: Get_Object_details_for_an_object_Id_cl_api_v1_objectsobject_idget

Request Payload:

TypeParameterDescriptionData Typeis_optional
Query Parameterobject_idID of an objectstringmandatory

sample code

import requests
URL = "https://api.kadal.ai/cl/api/v1/objects/{object_id}"

# sample python code
headers = { "Authorization ": "Bearer 1234567890" }

params={
"object_id":"string"
}

response = requests.get(URL, headers=headers,params=params)
print(response)

Example response -

{
"status": "string",
"message": "string",
"data": {
"object_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"version_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"version_no": 1,
"version_label": "string",
"tenant_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"object_type": "string",
"title": "string",
"description": "string",
"file_name": "string",
"file_extension": "string",
"size": 0,
"mimetype": "string",
"uri": "string",
"asset_location": "string",
"default_asset_thumbnail": "string",
"created_at": "2024-05-09T10:59:01.600Z",
"updated_at": "2024-05-09T10:59:01.600Z",
"deleted_at": "2024-05-09T10:59:01.600Z",
"created_by_name": "string",
"created_by_user_id": "string",
"created_by_user_type": "string",
"updated_by_name": "string",
"deleted_by_name": "string",
"is_latest_version": false,
"is_deleted": false,
"is_private": false,
"is_lga": "string",
"source": "string",
"tags": [
"string"
],
"kvp": {},
"taxonomy": [
{
"uuid": "string",
"title": "string"
}
],
"folders": [
"string"
],
"repos": [
"string"
],
"media": {
"height": 0,
"width": 0,
"audio_video_duration": 0,
"audio_description_text": "string",
"alt_text": "string",
"thumbnail": "string",
"streamingDetails": {
"resolution": "string",
"url": "string",
"label": "string"
},
"transcriptionDetails": {
"language": "string",
"url": "string",
"label": "string"
}
},
"usage_count": 0,
"license_expiration_date": "2024-05-09T10:59:01.600Z",
"license_validity": true,
"chunk_metadata": {}
}
}

Responses:

Status CodeDescriptionContent-Type
200Successful Responseapplication/json
404Object not foundapplication/json
400Bad Requestapplication/json
500Internal server errorapplication/json
422Validation Errorapplication/json
  • 200 (Successful Response): This response indicates successful retrieval of object details for the specified object ID.
  • 404 (Object not found): This response indicates that the requested object ID does not exist in the repository.
  • 400 (Bad Request): This response indicates that the request is invalid or malformed.
  • 500 (Internal server error): This response indicates an unexpected server error occurred while processing the request.
  • 422 (Validation Error): This response indicates that there are validation errors with the request parameters.

Update Object In The Repository API

/cl/api/v1/objects/{object_id}

  • Method: PUT
  • Summary: Update A Object In The Repository
  • Description: Update the latest version of an object in the object repository based on the object ID.
  • Operation ID: Update_a_object_in_the_repository_cl_api_v1_objectsobject_idput

Request Payload:

TypeParameterDescriptionData Typeis_optional
Parameterobject_idObject_id of an existing object to be updatedstringmandatory
Parametercreate_new_versionCreate a new version of the objectstringmandatory
Query Parameterversion_labelType of the object (e.g., "Document")stringmandatory
Query ParametertitleTitle or name of the documentstringmandatory
Query ParameterdescriptionDescription or summary of the documentstringmandatory
Query ParameteruriUniform Resource Identifier (URI) for accessing the documentstringmandatory
Query Parameteris_privateFlag indicating if the document is private (true) or public (false)booleanmandatory
Query Parameteris_lgaFlag indicating if the document is subject to Local Government Access (LGA)stringmandatory
Query ParametersourceSource or origin of the documentstringmandatory
Query ParametertagsList of tags associated with the documentarray of stringsoptional
Query ParameterkvpKey-value pairs for additional metadataobjectoptional
Query ParametertaxonomyTaxonomy information related to the documentarray of objectsoptional
Query ParameterfoldersList of folders where the document is organizedarray of stringsoptional
Query ParameterreposList of repositories where the document is storedarray of stringsoptional
Query Parameterlicense_expiration_dateExpiration date of the document's licensestring (ISO 8601 format)mandatory
Query Parameterlicense_validityFlag indicating the validity of the document's license (true/false)booleanmandatory
Query Parameterchunk_metadataAdditional metadata associated with document chunksobjectoptional

sample code

import requests
URL = "https://api.kadal.ai/cl/api/v1/objects/{object_id}"

# sample python code
headers = { "Authorization ": "Bearer 1234567890" }

params={
"version_label": "string",
"object_type": "Document",
"title": "string",
"description": "string",
"uri": "string",
"is_private": False,
"is_lga": "string",
"source": "string",
"tags": [
"string"
],
"kvp": {},
"taxonomy": [
{
"uuid": "string",
"title": "string"
}
],
"folders": [
"string"
],
"repos": [
"string"
],
"license_expiration_date": "2024-08-21T17:53:55.939Z",
"license_validity": True,
"media": {}

}

response = requests.put(URL, headers=headers,params=params)
print(response)

Responses:

Status CodeDescriptionContent-Type
200Successful Responseapplication/json
422Validation Errorapplication/json
  • 200 (Successful Response): This response indicates that the object was successfully updated in the repository.
  • 422 (Validation Error): This response indicates that there are validation errors with the request parameters.

Delete Object From The Repository API

/cl/api/v1/objects/{object_id}

  • Method: DELETE
  • Summary: Delete A Object From The Repository
  • Description: Delete an object from the object repository based on the object ID.
  • Operation ID: Delete_a_object_from_the_repository_cl_api_v1_objectsobject_iddelete

Request Payload:

TypeParameterDescriptionData Typeis_optional
Query Parameterobject_idID of an objectstringmandatory

sample code

import requests
URL = "https://api.kadal.ai/cl/api/v1/objects/{object_id}"

# sample python code
headers = { "Authorization ": "Bearer 1234567890" }

params={
"object_id":"string"
}

response = requests.delete(URL, headers=headers,params=params)
print(response)

Example response -

{
"status": "string",
"message": "string",
"data": {
"object_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"version_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"version_no": 1,
"version_label": "string",
"tenant_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"object_type": "string",
"title": "string",
"description": "string",
"file_name": "string",
"file_extension": "string",
"size": 0,
"mimetype": "string",
"uri": "string",
"asset_location": "string",
"default_asset_thumbnail": "string",
"created_at": "2024-05-09T11:07:18.381Z",
"updated_at": "2024-05-09T11:07:18.381Z",
"deleted_at": "2024-05-09T11:07:18.381Z",
"created_by_name": "string",
"created_by_user_id": "string",
"created_by_user_type": "string",
"updated_by_name": "string",
"deleted_by_name": "string",
"is_latest_version": false,
"is_deleted": false,
"is_private": false,
"is_lga": "string",
"source": "string",
"tags": [
"string"
],
"kvp": {},
"taxonomy": [
{
"uuid": "string",
"title": "string"
}
],
"folders": [
"string"
],
"repos": [
"string"
],
"media": {
"height": 0,
"width": 0,
"audio_video_duration": 0,
"audio_description_text": "string",
"alt_text": "string",
"thumbnail": "string",
"streamingDetails": {
"resolution": "string",
"url": "string",
"label": "string"
},
"transcriptionDetails": {
"language": "string",
"url": "string",
"label": "string"
}
},
"usage_count": 0,
"license_expiration_date": "2024-05-09T11:07:18.382Z",
"license_validity": true,
"chunk_metadata": {}
}
}

Responses:

Status CodeDescriptionContent-Type
200Successful Responseapplication/json
404Object not foundapplication/json
400Bad Requestapplication/json
500Internal server errorapplication/json
422Validation Errorapplication/json
  • 200 (Successful Response): This response indicates that the object was successfully deleted from the repository.
  • 404 (Object not found): This response indicates that the specified object ID was not found in the repository.
  • 400 (Bad Request): This response indicates that there was a problem with the request syntax or parameters.
  • 500 (Internal server error): This response indicates an unexpected server error occurred.
  • 422 (Validation Error): This response indicates that there are validation errors with the request parameters.

Get Object Details For a Specific Version API

/cl/api/v1/objects/{object_id}/versions/{version_id}

  • Method: GET
  • Summary: Get Object Details For An Object Id For A Specific Version
  • Description: Retrieve details for a specific version of an object from the object repository based on the object ID and version ID.
  • Operation ID: Get_Object_details_for_an_object_Id_for_a_specific_version_cl_api_v1_objectsobject_idversionsversion_idget

Request Payload:

TypeParameterDescriptionData Typeis_optional
Query Parameterobject_idObject_id of an existing object.stringmandatory
Query Parameterversion_idVersion_id of the existing object.stringmandatory

sample code

import requests
URL = "https://api.kadal.ai/cl/api/v1/objects/{object_id}/versions/{version_id}"

# sample python code
headers = { "Authorization ": "Bearer 1234567890" }

params={
"object_id":"string",
"version_id":"string"
}

response = requests.get(URL, headers=headers,params=params)
print(response)

Example response -

{
"status": "string",
"message": "string",
"data": {
"object_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"version_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"version_no": 1,
"version_label": "string",
"tenant_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"object_type": "string",
"title": "string",
"description": "string",
"file_name": "string",
"file_extension": "string",
"size": 0,
"mimetype": "string",
"uri": "string",
"asset_location": "string",
"default_asset_thumbnail": "string",
"created_at": "2024-05-09T11:09:37.863Z",
"updated_at": "2024-05-09T11:09:37.863Z",
"deleted_at": "2024-05-09T11:09:37.863Z",
"created_by_name": "string",
"created_by_user_id": "string",
"created_by_user_type": "string",
"updated_by_name": "string",
"deleted_by_name": "string",
"is_latest_version": false,
"is_deleted": false,
"is_private": false,
"is_lga": "string",
"source": "string",
"tags": [
"string"
],
"kvp": {},
"taxonomy": [
{
"uuid": "string",
"title": "string"
}
],
"folders": [
"string"
],
"repos": [
"string"
],
"media": {
"height": 0,
"width": 0,
"audio_video_duration": 0,
"audio_description_text": "string",
"alt_text": "string",
"thumbnail": "string",
"streamingDetails": {
"resolution": "string",
"url": "string",
"label": "string"
},
"transcriptionDetails": {
"language": "string",
"url": "string",
"label": "string"
}
},
"usage_count": 0,
"license_expiration_date": "2024-05-09T11:09:37.863Z",
"license_validity": true,
"chunk_metadata": {}
}
}

Responses:

Status CodeDescriptionContent-Type
200Successful Responseapplication/json
404Object not foundapplication/json
400Bad Requestapplication/json
500Internal server errorapplication/json
422Validation Errorapplication/json
  • 200 (Successful Response): This response indicates that the object details for the specified version were successfully retrieved.
  • 404 (Object not found): This response indicates that the specified object ID or version ID was not found in the repository.
  • 400 (Bad Request): This response indicates that there was a problem with the request syntax or parameters.
  • 500 (Internal server error): This response indicates an unexpected server error occurred.
  • 422 (Validation Error): This response indicates that there are validation errors with the request parameters.

Update New Version File For Object API

/cl/api/v1/objects/{object_id}/versions/{version_id}/uploadfile

  • Method: PUT
  • Summary: Update A New Version File For Object In The Object Repository
  • Description: Update a new version file for an object in the object repository.
  • Operation ID: Update_a_new_version_file_for_object_in_the_object_repositorycl_api_v1_objectsobject_idversionsversion_id__uploadfile_put

Request Payload:

TypeParameterDescriptionData Typeis_optional
Query Parameterobject_idObject_id of an existing object.stringmandatory
Query Parameterversion_idVersion_id of the existing object.stringmandatory
Query Parameterauto_chunkAuto chunk the filestringmandatory
Query ParameterfileFile to be uploaded in the repositorystringmandatory

sample code

import requests
URL = "https://api.kadal.ai/cl/api/v1/objects/{object_id}/versions/{version_id}/uploadfile"

# sample python code
headers = { "Authorization ": "Bearer 1234567890" }

params={
"object_id":"string",
"version_id":"string",
"auto_chunk":"string",
"file":"string"
}

response = requests.put(URL, headers=headers,params=params)
print(response)

Example response -

{
"status": "string",
"message": "string",
"data": {
"object_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"version_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"version_no": 1,
"version_label": "string",
"tenant_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"object_type": "string",
"title": "string",
"description": "string",
"file_name": "string",
"file_extension": "string",
"size": 0,
"mimetype": "string",
"uri": "string",
"asset_location": "string",
"default_asset_thumbnail": "string",
"created_at": "2024-05-09T11:11:55.448Z",
"updated_at": "2024-05-09T11:11:55.448Z",
"deleted_at": "2024-05-09T11:11:55.448Z",
"created_by_name": "string",
"created_by_user_id": "string",
"created_by_user_type": "string",
"updated_by_name": "string",
"deleted_by_name": "string",
"is_latest_version": false,
"is_deleted": false,
"is_private": false,
"is_lga": "string",
"source": "string",
"tags": [
"string"
],
"kvp": {},
"taxonomy": [
{
"uuid": "string",
"title": "string"
}
],
"folders": [
"string"
],
"repos": [
"string"
],
"media": {
"height": 0,
"width": 0,
"audio_video_duration": 0,
"audio_description_text": "string",
"alt_text": "string",
"thumbnail": "string",
"streamingDetails": {
"resolution": "string",
"url": "string",
"label": "string"
},
"transcriptionDetails": {
"language": "string",
"url": "string",
"label": "string"
}
},
"usage_count": 0,
"license_expiration_date": "2024-05-09T11:11:55.449Z",
"license_validity": true,
"chunk_metadata": {}
}
}

Responses:

Status CodeDescriptionContent-Type
200Successful Responseapplication/json
404Object not foundapplication/json
400Bad Requestapplication/json
500Internal server errorapplication/json
422Validation Errorapplication/json
  • 200 (Successful Response): This response indicates that the new version file for the object was successfully updated.
  • 404 (Object not found): This response indicates that the specified object ID or version ID was not found in the repository.
  • 400 (Bad Request): This response indicates that there was a problem with the request syntax or parameters.
  • 500 (Internal server error): This response indicates an unexpected server error occurred.
  • 422 (Validation Error): This response indicates that there are validation errors with the request parameters.

Update File For Object API

/cl/api/v1/objects/{object_id}/uploadfile

  • Method: PUT

  • Summary: Update The File For Object In The Object Repository

  • Description: Update the file for an object in the object repository.

  • Operation ID: Update_the_file_for_object_in_the_object_repositorycl_api_v1_objectsobject_id__uploadfile_put

Request Payload:

TypeParameterDescriptionData Typeis_optional
Query Parameterobject_idObject_id of an existing object.stringmandatory
Query Parameterauto_chunkAuto chunk the filestringmandatory
Query ParameterfileFile to be uploaded in the repositorystringmandatory

sample code

import requests
URL = "https://api.kadal.ai/cl/api/v1/objects/{object_id}/versions/{version_id}/uploadfile"

# sample python code
headers = { "Authorization ": "Bearer 1234567890" }

params={
"object_id":"string",
"auto_chunk":"string",
"file":"string"
}

response = requests.put(URL, headers=headers,params=params)
print(response)

Example response -

{
"status": "string",
"message": "string",
"data": {
"object_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"version_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"version_no": 1,
"version_label": "string",
"tenant_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"object_type": "string",
"title": "string",
"description": "string",
"file_name": "string",
"file_extension": "string",
"size": 0,
"mimetype": "string",
"uri": "string",
"asset_location": "string",
"default_asset_thumbnail": "string",
"created_at": "2024-05-09T11:15:19.065Z",
"updated_at": "2024-05-09T11:15:19.065Z",
"deleted_at": "2024-05-09T11:15:19.065Z",
"created_by_name": "string",
"created_by_user_id": "string",
"created_by_user_type": "string",
"updated_by_name": "string",
"deleted_by_name": "string",
"is_latest_version": false,
"is_deleted": false,
"is_private": false,
"is_lga": "string",
"source": "string",
"tags": [
"string"
],
"kvp": {},
"taxonomy": [
{
"uuid": "string",
"title": "string"
}
],
"folders": [
"string"
],
"repos": [
"string"
],
"media": {
"height": 0,
"width": 0,
"audio_video_duration": 0,
"audio_description_text": "string",
"alt_text": "string",
"thumbnail": "string",
"streamingDetails": {
"resolution": "string",
"url": "string",
"label": "string"
},
"transcriptionDetails": {
"language": "string",
"url": "string",
"label": "string"
}
},
"usage_count": 0,
"license_expiration_date": "2024-05-09T11:15:19.065Z",
"license_validity": true,
"chunk_metadata": {}
}
}

Responses:

Status CodeDescriptionContent-Type
200Successful Responseapplication/json
404Object not foundapplication/json
400Bad Requestapplication/json
500Internal server errorapplication/json
422Validation Errorapplication/json
  • 200 (Successful Response): This response indicates that the file for the object was successfully updated.
  • 404 (Object not found): This response indicates that the specified object ID was not found in the repository.
  • 400 (Bad Request): This response indicates that there was a problem with the request syntax or parameters.
  • 500 (Internal server error): This response indicates an unexpected server error occurred.
  • 422 (Validation Error): This response indicates that there are validation errors with the request parameters.

Search Chunks API

/cl/api/v1/chunks/search

  • Method: POST

  • Summary: Get All Chunks From The Repository

  • Description: Return a list of all the chunks that are present in the object repository.

  • Operation ID: Get_all_chunks_from_the_repository_cl_api_v1_chunks_search_post

Request Payload:

TypeParameterDescriptionData Typeis_optional
ParameterstartSpecifies the page number to retrieve (1-based index).intmandatory
Parameterpage_sizeSpecifies the number of items per page.intmandatory

sample code

import requests
URL = "https://api.kadal.ai/cl/api/v1/chunks/search"

# sample python code
headers = { "Authorization ": "Bearer 1234567890" }

params={
"start":int,
"page_size":int,
}

response = requests.post(URL, headers=headers,params=params)
print(response)

Example response -

{
"message": "string",
"total": 0,
"data": [
{
"lor_object_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"object_version": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"tenant_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"chunk_id": "string",
"text": "string",
"object_vector": [
0
],
"metadata": {}
}
]
}

Responses:

Status CodeDescriptionContent-Type
200Successful Responseapplication/json
404Object chunk not foundapplication/json
400Bad Requestapplication/json
500Internal server errorapplication/json
422Validation Errorapplication/json
  • 200 (Successful Response): This response indicates that the search for chunks was successful, and it returns the list of chunks.
  • 404 (Object chunk not found): This response indicates that no chunks were found in the repository.
  • 400 (Bad Request): This response indicates that there was a problem with the request syntax or parameters.
  • 500 (Internal server error): This response indicates an unexpected server error occurred.
  • 422 (Validation Error): This response indicates that there are validation errors with the request parameters.

Get Object Chunk Details API

/cl/api/v1/chunks/{chunk_id}

  • Method: GET
  • Summary: Get Object Details For An Object Chunk Id
  • Description: Return details for an object chunk from the object repository for the specified chunk id.
  • Operation ID: Get_Object_details_for_an_object_chunk_Id_cl_api_v1_chunkschunk_idget

Request Payload:

TypeParameterDescriptionData Typeis_optional
Parameterchunk_idchunk_id of an existing object.stringmandatory

sample code

import requests
URL = "https://api.kadal.ai/cl/api/v1/chunks/{chunk_id}"

# sample python code
headers = { "Authorization ": "Bearer 1234567890" }

params={
"chunk_id":"string"
}

response = requests.get(URL, headers=headers,params=params)
print(response)

Example response -

{
"message": "string",
"total": 0,
"data": {
"lor_object_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"object_version": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"tenant_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"chunk_id": "string",
"text": "string",
"object_vector": [
0
],
"metadata": {}
}
}

Responses:

Status CodeDescriptionContent-Type
200Successful Responseapplication/json
404Object chunk not foundapplication/json
400Bad Requestapplication/json
500Internal server errorapplication/json
422Validation Errorapplication/json
  • 200 (Successful Response): This response indicates that the chunk details were successfully retrieved, and it returns the details in JSON format.
  • 404 (Object chunk not found): This response indicates that the specified object chunk was not found in the repository.
  • 400 (Bad Request): This response indicates that there was a problem with the request syntax or parameters.
  • 500 (Internal server error): This response indicates an unexpected server error occurred.
  • 422 (Validation Error): This response indicates that there are validation errors with the request parameters.

Update Object Chunk API

/cl/api/v1/chunks/{chunk_id}

  • Method: PUT

  • Summary: Update A Object Chunk In The Repository

  • Description: Update the latest version of an object chunk in the object repository.

  • Operation ID: Update_a_object_chunk_in_the_repository_cl_api_v1_chunkschunk_idput

Request Payload:

TypeParameterDescriptionData Typeis_optional
Parameterchunk_idChunk id of an existing object to be updatedstringmandatory
Parametertexttext to be updatestringmandatory
Parametermetadatametadata to be updatestringmandatory

sample code

import requests
URL = "https://api.kadal.ai/cl/api/v1/chunks/{chunk_id}"

# sample python code
headers = { "Authorization ": "Bearer 1234567890" }

params={
"chunk_id":"string",
"text":"string",
"metadata":"string"
}

response = requests.put(URL, headers=headers,params=params)
print(response)

Example response -

{
"message": "string",
"data": {
"lor_object_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"object_version": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"tenant_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"chunk_id": "string",
"text": "string",
"object_vector": [
0
],
"metadata": {}
}
}

Responses:

Status CodeDescriptionContent-Type
200Successful Responseapplication/json
422Validation Errorapplication/json
  • 200 (Successful Response): This response indicates that the object chunk was successfully updated in the repository.
  • 422 (Validation Error): This response indicates that there are validation errors with the request parameters.

Delete Object Chunk API

/cl/api/v1/chunks/{chunk_id}

  • Method: DELETE

  • Summary: Delete A Object Chunk From The Repository

  • Description: Delete a specific chunk from the object repository.

  • Operation ID: Delete_a_object_chunk_from_the_repository_cl_api_v1_chunkschunk_iddelete

Request Payload:

TypeParameterDescriptionData Typeis_optional
Parameterchunk_idChunk id of an existing object to be updatedstringmandatory

sample code

import requests
URL = "https://api.kadal.ai/cl/api/v1/chunks/{chunk_id}"

# sample python code
headers = { "Authorization ": "Bearer 1234567890" }

params={
"chunk_id":"string",
}

response = requests.delete(URL, headers=headers,params=params)
print(response)

Example response -

{
"message": "string",
"data": {
"lor_object_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"object_version": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"tenant_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"chunk_id": "string",
"text": "string",
"object_vector": [
0
],
"metadata": {}
}
}

Responses:

Status CodeDescriptionContent-Type
200Successful Responseapplication/json
404Object chunk not foundapplication/json
400Bad Requestapplication/json
500Internal server errorapplication/json
422Validation Errorapplication/json
  • 200 (Successful Response): This response indicates that the object chunk was successfully deleted from the repository.
  • 404 (Object chunk not found): This response indicates that the specified object chunk was not found in the repository.
  • 400 (Bad Request): This response indicates that there was a problem with the request syntax or parameters.
  • 500 (Internal server error): This response indicates an unexpected server error occurred.
  • 422 (Validation Error): This response indicates that there are validation errors with the request parameters.

Create Object Chunk API

/cl/api/v1/chunks/

  • Method: POST
  • Summary: Create A New Object Chunk In The Repository
  • Description: Create a new object chunk in the object repository.
  • Operation ID: Create_a_new_object_chunk_in_the_repository_cl_api_v1_chunks__post

Request Payload:

TypeParameterDescriptionData Typeis_optional
query Parameterobject_idID of the created chunkstringmandatory
query Parameterversion_idID of the created chunkstringmandatory
query ParametertextUpdated text content or value of the objectstringmandatory
query ParametermetadataAdditional metadata associated with the objectstringmandatory

sample code

import requests
URL = "https://api.kadal.ai/cl/api/v1/chunks/"

# sample python code
headers = { "Authorization ": "Bearer 1234567890" }

params={
"object_id":"string",
"version_id":"string",
"text":"string",
"metadata":"string"
}

response = requests.post(URL, headers=headers,params=params)
print(response)

Example response -

{
"message": "string",
"data": {
"lor_object_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"object_version": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"tenant_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"chunk_id": "string",
"text": "string",
"object_vector": [
0
],
"metadata": {}
}
}

Responses:

Status CodeDescriptionContent-Type
200Successful Responseapplication/json
404Object chunk not foundapplication/json
400Bad Requestapplication/json
500Internal server errorapplication/json
422Validation Errorapplication/json
  • 200 (Successful Response): This response indicates that the object chunk was successfully created in the repository.
  • 404 (Object chunk not found): This response indicates that the specified object chunk was not found.
  • 400 (Bad Request): This response indicates that there was a problem with the request syntax or parameters.
  • 500 (Internal server error): This response indicates an unexpected server error occurred.
  • 422 (Validation Error): This response indicates that there are validation errors with the request parameters.

Create Object Chunks in Bulk API

/cl/api/v1/chunks/bulk

  • Method: POST

  • Summary: Create Object Chunks In Bulk In The Repository

  • Description: Create multiple object chunks in bulk in the object repository.

  • Operation ID: Create_object_chunks_in_bulk_in_the_repository_cl_api_v1_chunks_bulk_post

Request Payload:

TypeParameterDescriptionData Typeis_optional
RequestchunksArray of chunks containing document informationarraymandatory
object_idID of the document objectstringmandatory
version_idID of the document versionstringmandatory
textText content of the chunkstringmandatory
metadataAdditional metadata for the chunkobjectmandatory

sample code

import requests
URL = "https://api.kadal.ai/cl/api/v1/chunks/bulk"

# sample python code
headers = { "Authorization ": "Bearer 1234567890" }

params={
"chunks":"array"
"object_id":"string",
"version_id":"string",
"text":"string",
"metadata":"string"
}

response = requests.post(URL, headers=headers,params=params)
print(response)

Example response -

{
"message": "string",
"data": [
{
"lor_object_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"object_version": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"tenant_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"chunk_id": "string",
"text": "string",
"object_vector": [
0
],
"metadata": {}
}
]
}

Responses:

Status CodeDescriptionContent-Type
200Successful Responseapplication/json
404Object chunk not foundapplication/json
400Bad Requestapplication/json
500Internal server errorapplication/json
422Validation Errorapplication/json
  • 200 (Successful Response): This response indicates that the object chunks were successfully created in the repository.
  • 404 (Object chunk not found): This response indicates that one or more object chunks were not found.
  • 400 (Bad Request): This response indicates that there was a problem with the request syntax or parameters.
  • 500 (Internal server error): This response indicates an unexpected server error occurred.
  • 422 (Validation Error): This response indicates that there are validation errors with the request parameters.

Get Root Directory Information API

/cl/api/v1/directory/root

  • Method: GET
  • Summary: Get Root Directory Information For A Specific Tenant
  • Description: This API returns the root directory information for a tenant (if exists).
  • Operation ID: Get_root_directory_information_for_a_specific_tenant_cl_api_v1_directory_root_get

sample code

import requests
URL = "https://api.kadal.ai/cl/api/v1/directory/root"

# sample python code
headers = { "Authorization ": "Bearer 1234567890" }

params={
"ext_user_id_ref":"array"
}

response = requests.get(URL, headers=headers,params=params)
print(response)

Responses:

Status CodeDescriptionContent-Type
200Root directory foundapplication/json
404Not foundapplication/json
400Connection errorapplication/json
500Internal server errorapplication/json
422Validation Errorapplication/json
  • 200 (Root directory found): This response indicates that the root directory information for the specified tenant was found.
  • 404 (Not found): This response indicates that the root directory for the specified tenant does not exist.
  • 400 (Connection error): This response indicates a connection error occurred.
  • 500 (Internal server error): This response indicates an unexpected server error occurred.
  • 422 (Validation Error): This response indicates that there are validation errors with the request parameters.

Create Root Directory API

/cl/api/v1/directory/root

  • Method: POST
  • Summary: Create A Root Directory For A Tenant
  • Description: This API creates a root directory for a tenant. The root directory will be named as root_{tenant_code}. On success, this API returns the folder_id of the root directory that was created.
  • Operation ID: Create_a_root_directory_for_a_tenant_cl_api_v1_directory_root_post

sample code

import requests
URL = "https://api.kadal.ai/cl/api/v1/directory/root"

# sample python code
headers = { "Authorization ": "Bearer 1234567890" }

params={
"ext_user_id_ref":"string"
}

response = requests.post(URL, headers=headers,params=params)
print(response)

Responses:

Status CodeDescriptionContent-Type
201Successfully createdapplication/json
409Conflictapplication/json
400Connection errorapplication/json
500Internal server errorapplication/json
422Validation Errorapplication/json
  • 201 (Successfully created): This response indicates that the root directory for the tenant was successfully created.
  • 409 (Conflict): This response indicates a conflict occurred (e.g., root directory already exists for the tenant).
  • 400 (Connection error): This response indicates a connection error occurred.
  • 500 (Internal server error): This response indicates an unexpected server error occurred.
  • 422 (Validation Error): This response indicates that there are validation errors with the request parameters.

Get Folder Information API

/cl/api/v1/directory/{folder_id}

  • Method: GET
  • Summary: Get Folder Information For A Specific Directory
  • Description: Retrieve folder information for a specific folder identified by folder_id within a tenant. This API displays information about all children present inside the requested directory.
  • Operation ID: Get_folder_information_for_a_specific_directory_cl_api_v1_directoryfolder_idget

sample code

import requests
URL = "https://api.kadal.ai/cl/api/v1/directory/{folder_id}"

# sample python code
headers = { "Authorization ": "Bearer 1234567890" }

params={
"folder_id":"string"
"ext_user_id_ref":"string"
}

response = requests.get(URL, headers=headers,params=params)
print(response)

Responses:

Status CodeDescriptionContent-Type
200Directory foundapplication/json
404Not foundapplication/json
400Connection errorapplication/json
500Internal server errorapplication/json
422Validation Errorapplication/json
  • 200 (Directory found): This response indicates that the requested directory information was found and is returned in the response body.
  • 404 (Not found): This response indicates that the requested directory does not exist.
  • 400 (Connection error): This response indicates a connection error occurred.
  • 500 (Internal server error): This response indicates an unexpected server error occurred.
  • 422 (Validation Error): This response indicates that there are validation errors with the request parameters.

Update Directory Metadata API

/cl/api/v1/directory/{folder_id}

  • Method: PUT

  • Summary: Update Metadata Of A Directory

  • Description: This API updates metadata of a directory that is not the root directory. It should not be used for adding new children to an existing directory. If you want to create a new set of directory structure, use the DELETE API to delete the existing directory structure first, then use the POST API to create the new structure.

  • Operation ID: Update_metadata_of_a_directory_cl_api_v1_directoryfolder_idput

sample code

import requests
URL = "https://api.kadal.ai/cl/api/v1/directory/{folder_id}"

# sample python code
headers = { "Authorization ": "Bearer 1234567890" }

params={
"folder_id":"string"
"ext_user_id_ref":"string"
}

response = requests.put(URL, headers=headers,params=params)
print(response)

Responses:

Status CodeDescriptionContent-Type
200Successfully updatedapplication/json
403Forbiddenapplication/json
404Not foundapplication/json
409Conflictapplication/json
400Connection errorapplication/json
500Internal server errorapplication/json
422Validation Errorapplication/json
  • 200 (Successfully updated): This response indicates that the directory metadata was successfully updated.
  • 403 (Forbidden): This response indicates that the update operation is forbidden due to permissions.
  • 404 (Not found): This response indicates that the specified directory does not exist.
  • 409 (Conflict): This response indicates a conflict occurred (e.g., conflicting updates).
  • 400 (Connection error): This response indicates a connection error occurred.
  • 500 (Internal server error): This response indicates an unexpected server error occurred.
  • 422 (Validation Error): This response indicates that there are validation errors with the request parameters.

Add Directories API

/cl/api/v1/directory/{folder_id}

  • Method: POST
  • Summary: Add Single Or Multiple Directories To An Existing Directory
  • Description: Add one or more directories to a parent directory. The parent directory can be a root directory or any other existing directory. This API allows creating a complete directory structure with nested children directories under a root directory or adding one or more children to any existing parent directory. Each directory name at a certain level must be unique.
  • Operation ID: Add_Single_or_Multiple_directories_to_an_existing_directory_cl_api_v1_directoryfolder_idpost

sample code

import requests
URL = "https://api.kadal.ai/cl/api/v1/directory/{folder_id}"

# sample python code
headers = { "Authorization ": "Bearer 1234567890" }

params={
"directory_structure": [
{
"name": "Folder 1",
"is_private": False,
"type": "Folder",
"children": [],
"custom_metadata": {
"kvp": {
"key1": "value1"
},
"tags": [
"tag1"
],
"taxonomy": [
{
"uuid": "value1",
"title": "value2"
}
]
}
}
]
}

response = requests.post(URL, headers=headers,params=params)
print(response)

Responses:

Status CodeDescriptionContent-Type
201Successfully addedapplication/json
206Partially addedapplication/json
400Connection errorapplication/json
404Not foundapplication/json
409Conflictapplication/json
500Internal server errorapplication/json
422Validation Errorapplication/json
  • 201 (Successfully added): This response indicates that the directories were successfully added.
  • 206 (Partially added): This response indicates that some directories were added successfully, but not all.
  • 400 (Connection error): This response indicates a connection error occurred.
  • 404 (Not found): This response indicates that the specified parent directory (folder_id) was not found.
  • 409 (Conflict): This response indicates a conflict occurred, such as duplicate directory names at a certain level.
  • 500 (Internal server error): This response indicates an unexpected server error occurred.
  • 422 (Validation Error): This response indicates that there are validation errors with the request parameters.

Note: Ensure that each directory name at a certain level is unique to avoid conflicts when using this API.

Delete Directory API

/cl/api/v1/directory/{folder_id}

  • Method: DELETE
  • Summary: Delete A Directory
  • Description: Use this API to delete a directory (other than a root directory) and all its underlying directories (if they exist). Calling this API will delete all children directories (if they exist).
  • Operation ID: Delete_a_directory_cl_api_v1_directoryfolder_iddelete

sample python code

import requests
URL = "https://api.kadal.ai/cl/api/v1/directory/{folder_id}"


headers = { "Authorization ": "Bearer 1234567890" }
params={
"folder_id":"string"
}

Responses:

Status CodeDescriptionContent-Type
200Successfully deletedapplication/json
403Forbiddenapplication/json
404Child doesn't existapplication/json
400Connection errorapplication/json
500Internal server errorapplication/json
422Validation Errorapplication/json
  • 200 (Successfully deleted): This response indicates that the directory and its children (if any) were successfully deleted.
  • 403 (Forbidden): This response indicates that the deletion is forbidden, likely due to permission issues.
  • 404 (Child doesn't exist): This response indicates that the specified directory (folder_id) or its children do not exist.
  • 400 (Connection error): This response indicates a connection error occurred.
  • 500 (Internal server error): This response indicates an unexpected server error occurred.
  • 422 (Validation Error): This response indicates that there are validation errors with the request parameters.

Note: Calling this API will delete the specified directory (folder_id) and all its children directories recursively (if they exist). Use caution when using this API as it permanently removes directories and their contents.

Components

Schemas

Body_Update_a_new_version_file_for_object_in_the_object_repositorycl_api_v1_objectsobject_idversionsversion_id__uploadfile_put

  • Type: object
  • Description:
  • Properties:
    • file:
      • Type: string
      • Format: binary
      • Description: File to be uploaded in the repository

Body_Update_the_file_for_object_in_the_object_repositorycl_api_v1_objectsobject_id__uploadfile_put

  • Type: object
  • Description:
  • Properties:
    • file:
      • Type: string
      • Format: binary
      • Description: File to be uploaded in the repository against an existing object.

BulkVectorObject

  • Type: object
  • Description:
  • Properties:
    • object_id:
      • Type: string
      • Format: uuid
    • version_id:
      • Type: string
      • Format: uuid
    • text:
      • Type: string
    • metadata:

ChildItem

  • Type: object
  • Description:
  • Properties:
    • name:
      • Type: string
    • is_private:
      • Type: boolean
    • type:
    • children:
      • Type: array

ChildItemCreateModel

  • Type: object
  • Description:
  • Properties:
    • directory_structure:
      • Type: array

ChildItemUpdatePayloadModel

  • Type: object
  • Description:
  • Properties:
    • name:
      • Type: string
    • is_private:
      • Type: boolean
    • type:

ChunkSearchRequest

  • Type: object
  • Description:
  • Properties:
    • metadata:
      • Type: object

ChunkSearchResponse

  • Type: object
  • Description:
  • Properties:
    • message:
      • Type: string
    • total:
      • Type: integer
    • data:

ChunkSearchesResponse

  • Type: object
  • Description:
  • Properties:
    • message:
      • Type: string
    • total:
      • Type: integer
    • data:
      • Type: array

CoreObject_Update

  • Type: object
  • Description:
  • Properties:
    • version_label:
      • Type: string
    • object_type:
      • Type: string
    • title:
      • Type: string
    • description:
      • Type: string
    • uri:
      • Type: string
    • is_private:
      • Type: boolean
    • is_lga:
      • Type: string
    • source:
      • Type: string
    • tags:
      • Type: array
    • kvp:
      • Type: object
    • taxonomy:
      • Type: array
    • folders:
      • Type: array
    • repos:
      • Type: array
    • license_expiration_date:
      • Type: string
      • Format: date-time
    • license_validity:
      • Type: boolean
    • chunk_metadata:
      • Type: object

HTTPValidationError

  • Type: object
  • Description:
  • Properties:
    • detail:
      • Type: array

Media

  • Type: object
  • Description:
  • Properties:
    • height:
      • Type: integer
    • width:
      • Type: integer
    • audio_video_duration:
      • Type: number
    • audio_description_text:
      • Type: string
    • alt_text:
      • Type: string
    • thumbnail:
      • Type: string
    • streamingDetails:
    • transcriptionDetails:

MediaMetadata

  • Type: object
  • Description:
  • Properties:
    • height:
      • Type: integer
    • width:
      • Type: integer
    • audio_video_duration:
      • Type: number
    • audio_description_text:
      • Type: string
    • alt_text:
      • Type: string
    • thumbnail:
      • Type: string
    • streamingDetails:
    • transcriptionDetails:
    • additional_metadata:
      • Type: object

MediaObject

  • Type: object
  • Description:
  • Properties:
    • object_id:
      • Type: string
      • Format: uuid
    • version_id:
      • Type: string
      • Format: uuid
    • version_no:
      • Type: integer
    • version_label:
      • Type: string
    • tenant_id:
      • Type: string
      • Format: uuid
    • object_type:
      • Type: string
    • title:
      • Type: string
    • description:
      • Type: string
    • file_name:
      • Type: string
    • file_extension:
      • Type: string
    • size:
      • Type: integer
    • asset_location:
      • Type: string
    • mimetype:
      • Type: string
    • default_asset_thumbnail:
      • Type: string
    • created_by_user_id:
      • Type: string
    • created_by_user_type:
      • Type: string
    • created_at:
      • Type: string
      • Format: date-time
    • updated_at:
      • Type: string
      • Format: date-time
    • deleted_at:
      • Type: string
      • Format: date-time
    • media_metadata:
    • created_by_name:
      • Type: string
    • updated_by_name:
      • Type: string
    • deleted_by_name:
      • Type: string
    • source:
      • Type: string
    • tags:
      • Type: array
    • kvp:
      • Type: object
    • taxonomy:
      • Type: object
    • folders:
      • Type: array
    • repos:
      • Type: array
    • is_private:
      • Type: boolean
    • is_latest_version:
      • Type: boolean
    • is_lga:
      • Type: string
    • is_deleted:
      • Type: boolean
    • license_expiration_date:
      • Type: string
      • Format: date-time
    • license_validity:
      • Type: boolean

Msg

  • Type: object
  • Description:
  • Properties:
    • msg:
      • Type: string

Object

  • Type: object
  • Description:
  • Properties:
    • object_id:
      • Type: string
      • Format: uuid
    • version_id:
      • Type: string
      • Format: uuid
    • version_no:
      • Type: number
    • version_label:
      • Type: string
    • tenant_id:
      • Type: string
      • Format: uuid
    • object_type:
      • Type: string
    • title:
      • Type: string
    • description:
      • Type: string
    • file_name:
      • Type: string
    • file_extension:
      • Type: string
    • size:
      • Type: number
    • mimetype:
      • Type: string
    • uri:
      • Type: string
    • asset_location:
      • Type: string
    • default_asset_thumbnail:
      • Type: string
    • created_at:
      • Type: string
      • Format: date-time
    • updated_at:
      • Type: string
      • Format: date-time
    • deleted_at:
      • Type: string
      • Format: date-time
    • created_by_name:
      • Type: string
    • created_by_user_id:
      • Type: string
    • created_by_user_type:
      • Type: string
    • updated_by_name:
      • Type: string
    • deleted_by_name:
      • Type: string
    • is_latest_version:
      • Type: boolean
    • is_deleted:
      • Type: boolean
    • is_private:
      • Type: boolean
    • is_lga:
      • Type: string
    • source:
      • Type: string
    • tags:
      • Type: array
    • kvp:
      • Type: object
    • taxonomy:
      • Type: array
    • folders:
      • Type: array
    • repos:
      • Type: array
    • media:
    • usage_count:
      • Type: integer
    • license_expiration_date:
      • Type: string
      • Format: date-time
    • license_validity:
      • Type: boolean
    • chunk_metadata:
      • Type: object

ObjectNew

  • Type: object
  • Description:
  • Properties:
    • code:
      • Type: string
    • version_label:
      • Type: string
    • object_type:
    • title:
      • Type: string
    • description:
      • Type: string
    • file_name:
      • Type: string
    • file_extension:
      • Type: string
    • uri:
      • Type: string
    • tags:
      • Type: array
    • kvp:
      • Type: object
    • taxonomy:
      • Type: array
    • repos:
      • Type: array
    • folders:
      • Type: array
    • source:
      • Type: string
    • is_private:
      • Type: boolean
    • is_lga:
      • Type: string
    • is_latest_version:
      • Type: boolean
    • is_deleted:
      • Type: boolean
    • license_expiration_date:
      • Type: string
      • Format: date-time
    • license_validity:
      • Type: boolean
    • created_by_name:
      • Type: string
    • metadata:
      • Type: object

ObjectResponse

  • Type: object
  • Description:
  • Properties:
    • status:
      • Type: string
    • message:
      • Type: string
    • data:

ObjectType

  • Type: string
  • Description: An enumeration.
  • Properties:

ObjectsSearchResponse

  • Type: object
  • Description:
  • Properties:
    • message:
      • Type: string
    • data:

ReponseModelView

  • Type: object
  • Description:
  • Properties:
    • status_code:
    • message:
      • Type: string
    • data:
      • Type: array

ResponseModelBase

  • Type: object
  • Description:
  • Properties:
    • status_code:
    • message:
      • Type: string

ResponseModelCreate

  • Type: object
  • Description:
  • Properties:
    • status_code:
    • message:
      • Type: string
    • folder_id:
      • Type: string

RootDirectoryPayload

  • Type: object
  • Description:
  • Properties:
    • tenant_code:
      • Type: string

SearchRecord

  • Type: object
  • Description:
  • Properties:
    • object_id:
      • Type: string
      • Format: uuid
    • version_id:
      • Type: string
      • Format: uuid
    • version_no:
      • Type: number
    • version_label:
      • Type: string
    • tenant_id:
      • Type: string
      • Format: uuid
    • object_type:
      • Type: string
    • title:
      • Type: string
    • description:
      • Type: string
    • file_name:
      • Type: string
    • file_extension:
      • Type: string
    • size:
      • Type: number
    • mimetype:
      • Type: string
    • uri:
      • Type: string
    • asset_location:
      • Type: string
    • default_asset_thumbnail:
      • Type: string
    • created_at:
      • Type: string
      • Format: date-time
    • updated_at:
      • Type: string
      • Format: date-time
    • deleted_at:
      • Type: string
      • Format: date-time
    • created_by_name:
      • Type: string
    • created_by_user_id:
      • Type: string
    • created_by_user_type:
      • Type: string
    • updated_by_name:
      • Type: string
    • deleted_by_name:
      • Type: string
    • is_latest_version:
      • Type: boolean
    • is_deleted:
      • Type: boolean
    • is_private:
      • Type: boolean
    • is_lga:
      • Type: string
    • source:
      • Type: string
    • tags:
      • Type: array
    • kvp:
      • Type: object
    • taxonomy:
      • Type: array
    • folders:
      • Type: array
    • repos:
      • Type: array
    • media:
    • usage_count:
      • Type: integer
    • license_expiration_date:
      • Type: string
      • Format: date-time
    • license_validity:
      • Type: boolean
    • chunk_metadata:
      • Type: object
    • score:
      • Type: number
    • content:
      • Type: string

SearchResponse

  • Type: object
  • Description:
  • Properties:
    • total:
      • Type: integer
    • records:
      • Type: array
    • aggregations:
      • Type: object

Taxonomy

  • Type: object
  • Description:
  • Properties:
    • uuid:
      • Type: string
    • title:
      • Type: string

Types

  • Type: string
  • Description: An enumeration.
  • Properties:

ValidationError

  • Type: object
  • Description:
  • Properties:
    • loc:
      • Type: array
    • msg:
      • Type: string
    • type:
      • Type: string

VectorObject

  • Type: object
  • Description:
  • Properties:
    • lor_object_id:
      • Type: string
      • Format: uuid
    • object_version:
      • Type: string
      • Format: uuid
    • tenant_id:
      • Type: string
      • Format: uuid
    • chunk_id:
      • Type: string
    • text:
      • Type: string
    • object_vector:
      • Type: array
    • metadata:
      • Type: object

VectorObjectNew

  • Type: object
  • Description:
  • Properties:
    • object_id:
      • Type: string
      • Format: uuid
    • version_id:
      • Type: string
      • Format: uuid
    • text:
      • Type: string
    • metadata:
      • Type: object

VectorObjectResponse

  • Type: object
  • Description:
  • Properties:
    • message:
      • Type: string
    • data:

VectorObjectResponses

  • Type: object
  • Description:
  • Properties:
    • message:
      • Type: string
    • data:
      • Type: array

VectorObjectUpdate

  • Type: object
  • Description:
  • Properties:
    • text:
      • Type: string
    • metadata:
      • Type: object

VectorObjectsNew

  • Type: object
  • Description:
  • Properties:
    • chunks:
      • Type: array

appmodelcoreobject__StreamingDetails

  • Type: object
  • Description:
  • Properties:
    • resolution:
      • Type: string
    • url:
      • Type: string
    • label:
      • Type: string

appmodelcoreobject__TranscriptionDetails

  • Type: object
  • Description:
  • Properties:
    • language:
      • Type: string
    • url:
      • Type: string
    • label:
      • Type: string

appschemaspydantic_schemasmedia_filesStreamingDetails

  • Type: object
  • Description:
  • Properties:
    • resolution:
      • Type: string
    • url:
      • Type: string
    • label:
      • Type: string

appschemaspydantic_schemasmedia_filesTranscriptionDetails

  • Type: object
  • Description:
  • Properties:
    • language:
      • Type: string
    • url:
      • Type: string
    • label:
      • Type: string